/*******************************************************************************
 * Copyright (c) 2012 BestSolution.at and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation
 *******************************************************************************/
package org.eclipse.fx.ide.fxml.wizards.template

import org.eclipse.fx.ide.ui.wizards.template.IGenerator

class FXMLTemplate implements IGenerator<org.eclipse.fx.ide.fxml.wizards.template.FXMLElement> { 
	override generateContent(org.eclipse.fx.ide.fxml.wizards.template.FXMLElement element) '''
		<?xml version="1.0" encoding="UTF-8"?>
		
		<?import «element.rootElement.fullyQualifiedName»?>
		
		«IF element.fxRoot»<fx:root xmlns:fx="http://javafx.com/fxml/1" type="«element.rootElement.elementName»">«ELSE»<«element.rootElement.elementName» xmlns:fx="http://javafx.com/fxml/1">«ENDIF»
			<!-- TODO Add Nodes -->
		«IF element.fxRoot»</fx:root>«ELSE»</«element.rootElement.elementName»>«ENDIF»
		
	'''
}